<template>
  <div class="confirm-mask" catchtouchmove='ture'>
    <div class="confirm-content">
      <div class="text">{{msg}}</div>
      <div class="desc">{{msgdesc}}</div>
      <div class="btn"><span class="mgr-30" @click="confirm">确定</span><span @click="cancel">取消</span></div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  props: ['msg', 'msgdesc'],

  methods: {
    confirm () {
      this.$emit('confirm', true)
    },
    cancel () {
      this.$emit('cancel', false)
    }
  }
}
</script>
<style scoped>
.confirm-mask {
  width: 100%;
  height: 100%;
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  z-index: 12;
}

.confirm-content {
  text-align: center;
  position: relative;
  top: 340rpx;
  background: #fff;
  margin: 0 90rpx;
  padding: 50rpx 40rpx;
  border-radius: 20rpx;
  font-size: 34rpx;
  line-height: 1.8;
  animation: mymove 0.2s 1;
}

@keyframes mymove {
  from {
    transform: scale(0); /*开始为原始大小*/
  }
  to {
    transform: scale(1); /*放大1.1倍*/
  }
}

.text {
  font-weight: bold;
}

.desc {
  font-size: 26rpx;
}
.btn {
  margin-top: 60rpx;
}
.btn span {
  font-size: 32rpx;
  color: #fff;
  background: #e33a44;
  padding: 20rpx 82rpx;
  border-radius: 100rpx;
}
.mgr-30 {
  margin-right: 30rpx;
}
</style>
